package cn.calm.application.service.impl;

import org.apache.log4j.Logger;

import cn.calm.application.service.IApplicationService;
import cn.calm.commons.exception.DeskException;
import cn.calm.commons.service.defaultimpl.DefaultServiceImpl;
import cn.calm.entity.Application;

public class ApplicationServiceImpl<T extends Application>
		extends DefaultServiceImpl<T> implements IApplicationService<T> {
	private static final Logger log = Logger
			.getLogger(ApplicationServiceImpl.class);

	public void add(final T t) throws DeskException {
		log.debug("add start");
//		List<T> list = (List<T>) baseDao.listAll(Application.class,
//				new DefaultQueryConditionBuilder<T>(t));
//		if (list.size() != 0) {
//			throw new DeskException("EM0001", t);
//		}
//		Integer id = getNextId(Application.class);
//		t.setId(String.valueOf(id));
		baseDao.insert(t);
		log.debug("add end");
	}

}
